<include file="Public/header" /> 

<!--主窗体-->
<div class="container app">
	<!--左侧菜单-->
	<include file="Public/sidebar" /> 
	<!--左侧菜单//-->
	
	<!-- mainCon -->
	<div id="mainCon" class="mainCon">
		<h4>文章分类列表</h4>
		<!-- <div>
			<a href="<{:U('Admin/ArticleCate/articleCateAdd',array('k'=>1,'sk'=>11))}>" class="btn btn-default">添加分类</a>
		</div> -->
		<div class="bk10"></div>
		<table class="table table-bordered table-hover">
			<tr>
				<th>编号</th>
				<th>分类名称</th>
				<th>创建时间</th>
				<th>创建人</th>
				<th>状态</th>
				<th>操作</th>
			</tr>

			<empty name="list">
				<tr><td colspan="6" style="text-align:center;color:#999">～暂无数据～</td></tr>
			<else /> 

				<foreach name="list" item="vo">
					<tr>
						<td><{$vo['id']}></td>
						<td><{$vo['cat_name']}></td>
						<td><{$vo['createtime']|date="Y-m-d H:i",###}></td>
						<td>
							<{$vo['nickname']}>
						</td>
						<td>
							<if condition="$vo['status'] eq 1">
								<span style="color:#66CC33">显示</span>
							<else />
								<span style="color:#FFA530">隐藏</span>
							</if>
						</td>
						<td>
							<a href="<{:U('Admin/ArticleCate/articleCateEdit',array('id'=>$vo['id'],'k'=>1,'sk'=>11))}>">编辑</a>
							<a href="javascript:void(0)" class="delAct" data-id="<{$vo['id']}>">删除</a>
						</td>
					</tr>
				</foreach>
			
			</empty>
			
		</table>
		
		<div class="pagebar">
			<{$pager}>
		</div>
		
	</div>
	<!-- mainCon// -->
	
</div>
<!--主窗体//-->

<script src="__PUBLIC__/js/layer/layer.js"></script>
<script>
$(function(){

	$(".delAct").click(function(){
		var that = this;
		layer.confirm('您是否确认删除该记录？删除后不可恢复！', {icon: 3, title:'提示'}, function(index){
			var itemid = $(that).attr("data-id");
			$.post("<{:U('Admin/ArticleCate/articleCateDel')}>",{id:itemid},function(r){
				if(r.error == 1){
					layer.close(index);
					layer.alert(r.errmsg,{icon: 2});
				}else{
					window.location.reload();
				}
			});
		});
		return false;
	});
});
</script>

<include file="Public/footer" /> 